import ZbTree from './input/tree'
import ZbTreeSelect from './input/treeSelect'
import Zbpass from './input/pass'
import ZbBtnGroup from './btn/group'
import ZbBtnText from './btn/text'
import ZbTipInput from './input/tooltip'
import ZbUpload from './upload'
import ZbHeaderSearch from './header/search'
const components = [
    ZbTree,
    ZbTreeSelect,
    Zbpass,
    ZbBtnGroup,
    ZbTipInput,
    ZbBtnText,
    ZbUpload,
    ZbHeaderSearch
]

const install = (Vue: any) => {
    components.forEach((component: any) => {
        Vue.component(component.options.name, component);
    });
};

if (typeof window !== 'undefined' && window.Vue) {
    install(window.Vue);
}

export default {
    install,
    ZbTree,
    ZbTreeSelect,
    Zbpass,
    ZbBtnGroup,
    ZbTipInput,
    ZbBtnText,
    ZbUpload,
    ZbHeaderSearch
}